'************************************************************************************
' Copyright  2003-2005 Kathleen Dollard
'
' This software is provided 'as-is', without any express or implied warranty. In no 
' event will the author be held liable for any damages arising from the use of this
' software.
' 
' You may use this software for any purpose, including commercial applications, 
' and you may redistribute this software as part of application delivery: however, 
' this copyright notice may not be removed and you may not otherwise redistribute 
' this software directly other than providing a link to wwww.gendotnet.com. 
'
' You may alter this software to better server your needs (I'd like to hear about your 
' changes in order to make the software better). If you alter the softwre, you must  
' clearly mark it as altered and must not be misrepresented as the original software.
' nor wholly your original work.
'*************************************************************************************
'  Summary: Currently unused code that could be reused to isolate project settings. This proved to complex for most scenarios in testing.

Option Strict On
Option Explicit On

Imports System


' This is a replacement for Project settings which has been altered to use this file
' Later add set functions
Namespace KADGen.CodeGenerationSupport
   Public Class Settings

      Public Shared Function GetCommentStart(ByVal language As OutputFileType) As String
         Select Case language
            Case OutputFileType.VB
               Return "' "
            Case OutputFileType.CSharp
               Return "/* "
            Case OutputFileType.XML
               Return "<!-- "
            Case OutputFileType.StoredProc
               Return "/* "
         End Select
         Return Nothing
      End Function

      Public Shared Function GetCommentEnd(ByVal language As OutputFileType) As String
         Select Case language
            Case OutputFileType.VB
               Return ""
            Case OutputFileType.CSharp
               Return " */"
            Case OutputFileType.XML
               Return " -->"
            Case OutputFileType.StoredProc
               Return " */"
         End Select
         Return Nothing
      End Function

      ''' <summary>
      ''' 
      ''' </summary>
      ''' <param name="genType"></param>
      ''' <returns></returns>
      ''' <remarks>This should be localized</remarks>
      Public Shared Function GetCommentText( _
               ByVal genType As OutputGenType) _
               As String
         Dim ret As String = ""
         ret = Microsoft.VisualBasic.vbCrLf & "'  "
         Select Case genType
            Case OutputGenType.Once
               ret &= "This file is only generated if missing. Delete the file to force regeneration."
            Case OutputGenType.UntilEdited
               ret &= "This file is regenerated until it's edited. Delete the file to force regeneration."
            Case OutputGenType.Always
               ret &= "This file autogenerated - DO NOT EDIT THIS FILE"
            Case OutputGenType.Never
               ret &= "Add an intelligent message if you figure out a way to use this"
            Case OutputGenType.Overwrite
               ret &= "This file will be overwritten  DO NOT EDIT THIS FILE - YOUR EDITS WILL BE LOST"
         End Select
         ret &= Microsoft.VisualBasic.vbCrLf & Microsoft.VisualBasic.vbCrLf & _
               "'  NOTE: This denotes the way the file was created and it's possible the " & _
               Microsoft.VisualBasic.vbCrLf & _
               "'        generation type has since changed." & _
               Microsoft.VisualBasic.vbCrLf & _
               "'        Check the generation script for the curent state of the file." & _
               Microsoft.VisualBasic.vbCrLf
         Return ret
      End Function

      ''' <summary>
      ''' 
      ''' </summary>
      ''' <returns></returns>
      ''' <remarks>Should be localized</remarks>
      Public Shared Function GetHashExplanation() _
               As String
         Return "This funny long numbers are hashes, dont change them"
      End Function

      Public Shared Function GetFullHashMarker() As String
         Return "%%%###%%%"
      End Function

      Public Shared Function GetSemanticHashMarker() As String
         Return "%%%##Semantic##%%%"
      End Function

      Public Shared Function GetNoWSHashMarker() As String
         Return "%%%##NoWS##%%%"
      End Function

      Public Shared Function GetHeaderMarker() As String
         Return "***^^^***|||***^^^***"
      End Function

   End Class
End Namespace